package pers.csw.lookBook.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import pers.csw.lookBook.entity.Chapter;

import java.util.List;

/**
 * @author csw
 */
@Mapper
public interface ChapterMapper extends BaseMapper<Chapter> {
    /**
     * 通过书籍id获取该书籍所有的章节
     * @param bookId 书籍id
     * @return  返回该书籍所有的章节
     */
    @Select("select * from lb_book_chapter where book_id =#{bookId}")
    List<Chapter> getChapter(Integer bookId);
}
